package day4.HomeWork;

/**
 * ClassName：Test5
 *
 * @Author：小鱼
 * @Create：2025-08-07 16:48
 */
public class Test5 {
    public static void main(String[] args) {
        String str1 = "hello";
        String str2 = "hello";
        String str3 = new String("hello");
        String str4 = new String("hello");
        String str5 = "hellohello";
        String str6 = str1 + str2;
        System.out.println(str1 == str2);//true
        System.out.println(str2 == str3);//false
        System.out.println(str3 == str4);//false
        System.out.println(str2.equals(str3));//true
        System.out.println(str3.equals(str4));//true
        System.out.println(str5.equals(str6));//true
        System.out.println(str5 == str6);//false
    }
}
